import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/tb-adm/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/tb-adm/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/tb-adm/logout',
    method: 'post'
  })
}

export default {
  path() {
    return request({
      url: '/tb-menu/tbMenuList',
      method: 'get',
    })
  },
  // updatePass(params) {
  //   return request({
  //     url: '/admin/sysUser/password',
  //     method: 'post',
  //     params,
  //   })
  // },
  get(params) {
    return request({
      url: '/user/partner/get',
      method: 'post',
      params
    })
  },
  add(data) {
    return request({
      url: '/user/partner/add',
      method: 'post',
      data
    })
  },

  remove(params) {
    return request({
      url: '/user/partner/remove',
      method: 'post',
      params
    })
  },
}
